﻿var link_dialog = function (jo, options) {
    var attrobj = Utils.getAttrObject(jo, "dialog");
    var settings = $.extend({
        type:   jo.attr("type")||"iframe",
        title: jo.attr("tip") || jo.attr("title") || jo.text(),
        url: jo.attr("href"),
        mask: jo.attr("mask"),
        resizeable: jo.attr("resizeable"),
        dragable: jo.attr("dragable"),
        maxable: jo.attr("maxable"),
        minable: jo.attr("minable"),
        width: jo.attr("width") || "80%",
        height: jo.attr("height") || "80%",
        confirm: jo.attr("confirm"),
        intent: jo.attr("intent"),
        frompointerid: jo.attr("frompointerid")
    }, options, attrobj);
    if (settings.confirm) {
        mAlertManager.confirm(settings.confirm, function () {
            mDialogManager.open(settings);
        });
    } else {
        mDialogManager.open(settings);
    }
}